Change-Id: Ia2c795a95b58f62f4687501a5537e5890d90144e
- return $.inArray( action, csrfActions ) !== -1 ? 'csrf' : action;
+ if ( $.inArray( action, csrfActions ) !== -1 ) {
+ mw.track( 'mw.deprecate', 'apitoken_' + action );
+ mw.log.warn( 'Use of the "' + action + '" token is deprecated. Use "csrf" instead.' );
+ return 'csrf';
+ }
+ return action;
}
// Pre-populate with fake ajax promises to save http requests for tokens
}
// Pre-populate with fake ajax promises to save http requests for tokens